import React, { Component } from 'react'
import Filed from './index';
export default class App extends Component {
  state={
    username:"",
    paswrd:"",
  }
  getUserName=(e)=>{
    // console.log(e);
    this.setState({
      username:e,
    })
  }
  getPassword=(e)=>{
    // console.log(e);
    this.setState({
      paswrd:e,
    })
  }
  render() {
    return (
      <div>
        <div>登录</div>
        <Filed type="text" label="用户名" valueData={this.getUserName} value={this.state.username}></Filed>
        <Filed type="password" label="密码" valueData={this.getPassword} value={this.state.paswrd}></Filed>
      </div>
    )
  }
}
